package io.gitee.kotle.demo

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import io.gitee.kotle.android.mvvm.MvvmViewModel
import io.gitee.kotle.base.library.BaseViewModel

class MainViewModel : BaseViewModel() {
    private val _addCountData = MutableLiveData<Int>()
    val addCountData: LiveData<Int>
        get() = _addCountData

    fun add() {
        val old = _addCountData.value ?: 0
        _addCountData.value = old + 1
    }
}